xend: Improve "cpus" parameter to be able to define CPU affinities for each VCPU
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 8 May 2008 10:15:58 +0000 (11:15 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 8 May 2008 10:15:58 +0000 (11:15 +0100)
commitef4c89d29430fa2e300cafeeb64c3e635f672d29
tree73e5c296b1de17bd5fdb734e9506040f8589785d
parent175929a3b46c8cf3d4592bad299898fa407fa349
xend: Improve "cpus" parameter to be able to define CPU affinities for each VCPU

If we define the form of list of string to "cpus" parameter,
different CPU affinities are set for each VCPU as follows.

 # grep cpus /etc/xen/vm1
 cpus = ["2", "3"]
 vcpus = 2
 # xm create vm1
 Using config file "/etc/xen/vm1".
 Started domain vm1
 # xm vcpu-list vm1
 Name                                ID  VCPU   CPU State   Time(s)
 CPU Affinity
 vm1                                  1     0     2   r--       3.5 2
 vm1                                  1     1     3   -b-       3.2 3

If we define the form of string to "cpus" parameter as before,
a same CPU affinity is set for each VCPU as follows.

 # grep cpus /etc/xen/vm2
 cpus = "2,3"
 vcpus = 2
 # xm create vm2
 Using config file "/etc/xen/vm2".
 Started domain vm2
 # xm vcpu-list vm2
 Name                                ID  VCPU   CPU State   Time(s)
 CPU Affinity
 vm2                                  2     0     3   -b-       3.0
 2-3
 vm2                                  2     1     2   r--       2.6
 2-3

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendConfig.py
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendDomainInfo.py